package com.dp.temp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public class taskHdbigDate {

    @Autowired
    RedisTemplate redisTemplate;

    @Autowired
    JdbcTemplate jdbcTemplate;

//    @PostConstruct
    public void taskHdbigDate() {
        Map<String, Object> map = new HashMap();
        this.redisTemplate.opsForValue().set("findHdBigDanger", xie());
    }

    public List<Map<String, Object>> xie() {
        List<Map<String, Object>> ls = new ArrayList<>();
        Map<String, Object> map1 = new HashMap();
        map1.put("COUNT","6525");
        map1.put("ONAME","H2/CO深冷分离单元");
        map1.put("czfzrCount","50");
        map1.put("czfzrRate","100%");
        map1.put("jsfzrCount","27");
        map1.put("jsfzrRate","100%");
        map1.put("yhslCount","0");
        map1.put("yhslRate","0");
        map1.put("zpcrwCount","86");
        map1.put("zpcrwRate","100%");
        map1.put("zyfzrCount","9");
        map1.put("zyfzrRate","100%");
        Map<String, Object> map2 = new HashMap();
        map2.put("COUNT","9466");
        map2.put("ONAME","气柜单元");
        map2.put("czfzrCount","50");
        map2.put("czfzrRate","100%");
        map2.put("jsfzrCount","27");
        map2.put("jsfzrRate","100%");
        map2.put("yhslCount","0");
        map2.put("yhslRate","0");
        map2.put("zpcrwCount","86");
        map2.put("zpcrwRate","100%");
        map2.put("zyfzrCount","9");
        map2.put("zyfzrRate","100%");
        Map<String, Object> map3 = new HashMap();
        map3.put("COUNT","6525");
        map3.put("ONAME","中间罐区");
        map3.put("czfzrCount","50");
        map3.put("czfzrRate","100%");
        map3.put("jsfzrCount","27");
        map3.put("jsfzrRate","100%");
        map3.put("yhslCount","0");
        map3.put("yhslRate","0");
        map3.put("zpcrwCount","86");
        map3.put("zpcrwRate","100%");
        map3.put("zyfzrCount","9");
        map3.put("zyfzrRate","100%");
        Map<String, Object> map4 = new HashMap();
        map4.put("COUNT","6525");
        map4.put("ONAME","DMO合成");
        map4.put("czfzrCount","50");
        map4.put("czfzrRate","100%");
        map4.put("jsfzrCount","27");
        map4.put("jsfzrRate","100%");
        map4.put("yhslCount","0");
        map4.put("yhslRate","0");
        map4.put("zpcrwCount","86");
        map4.put("zpcrwRate","100%");
        map4.put("zyfzrCount","9");
        map4.put("zyfzrRate","100%");
        Map<String, Object> map5 = new HashMap();
        map5.put("COUNT","6525");
        map5.put("ONAME","LNG罐区");
        map5.put("czfzrCount","50");
        map5.put("czfzrRate","100%");
        map5.put("jsfzrCount","27");
        map5.put("jsfzrRate","100%");
        map5.put("yhslCount","0");
        map5.put("yhslRate","0");
        map5.put("zpcrwCount","86");
        map5.put("zpcrwRate","100%");
        map5.put("zyfzrCount","9");
        map5.put("zyfzrRate","100%");
        Map<String, Object> map6 = new HashMap();
        map6.put("COUNT","6525");
        map6.put("ONAME","副产品罐区");
        map6.put("czfzrCount","50");
        map6.put("czfzrRate","100%");
        map6.put("jsfzrCount","27");
        map6.put("jsfzrRate","100%");
        map6.put("yhslCount","0");
        map6.put("yhslRate","0");
        map6.put("zpcrwCount","86");
        map6.put("zpcrwRate","100%");
        map6.put("zyfzrCount","9");
        map6.put("zyfzrRate","100%");
        Map<String, Object> map7 = new HashMap();
        map7.put("czfzrCount","300");
        map7.put("ONAME","汇总");
        map7.put("czfzrRate","100%");
        map7.put("jsfzrRate","100%");
        map7.put("jsfzrCount","162");
        map7.put("yhslCount","0");
        map7.put("yhslRate","0");
        map7.put("zpcrwCount","516");
        map7.put("zpcrwRate","100%");
        map7.put("zyfzrCount","54");
        map7.put("zyfzrRate","100%");

        ls.add(map1);
        ls.add(map2);
        ls.add(map3);
        ls.add(map4);
        ls.add(map5);
        ls.add(map6);
        ls.add(map7);
        return ls;
    }
}
